perm filename OKM1[F8,ALS] blob sn#307786 filedate 1977-10-06 generic text, type C, neo UTF8
COMMENT āŠ—   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	OKMV    DCI     PLMD		Saved data location
C00005 ENDMK
CāŠ—;
OKMV    DCI     PLMD		Saved data location
        LM                      Get the old X value
        COM
        INC
        AS      1               This gives us the change in X
        BZ      NON2            Illegal
        LR      1,A             Save the difference
        BP      OKM1
        COM
        INC
OKM1    LR      0,A		|X|
	CI	H'2'
	BM	NON3		Too far
	CLR			Anticipate normal move
	BNZ	OKM2
	LI	H'10'		Set Jump bit
OKM2	LR	6,A		save byte info here
        LM                      Get the old Y value
        COM
        INC
        AS      2
        LR      2,A		Change in Y
	BM	OKM3
	COM
	INC
OKM3	AS	0
	BNZ	NON2		|X|≠|Y|
	LR	A,2
	NS	2
        BP      OKM4
	LIS	H'2'		Backward bit
	AS	6
	LR	6,A
OKM4	LR	A,1
	NS	1
	BM	OKM5		
	LIS	H'1'		Left bit
	AS	6
	LR	6,A
OKM5	LR	A,4		BYTE #
	SL	1
	SL	1
	AS	6
	LR	6,A		Final byte info
        DCI    PLMV            Possible moves listing
OKM6    LM                      Get first move byte
        NI      H'FF'
        BZ      NONO            No more entries
        NS      3
	LM
	LR	5,A
        BZ      OKM6		Try again
	XS      6
        BNZ     OKM6            Try again
        DCI     TREE		Store final values
        LR      H,DC
        LIS     H'C'
        ADC
        LR      A,3
        ST                      Store byte
        LR      A,6
        ST                      And byte info
        PI      NOOP       *--* DEBUGGING 
        LR      DC,H
        JMP     SELE

NONO	LR	A,5
	NI	H'10'		A jump required?
	LIS	H'2'
	BZ	NON4
	LIS	H'1'
	BR	NON4
NON2	LIS	H'2'
	BR	NON4
NON3	LIS	H'3'
	BR	NON4
NON4	DS	7
	BP	NON5
*--* TURN OFF BLINK HERE
	JMP	MESO
NON5	LR	0,A
	PI	WMC
	JMP	CUR2